const User = require('../../models/user')

module.exports = (req, res) => {
  const user_id = req.body.id
  User.findByIdAndRemove({
    _id:user_id
  },(err) => {
    if (err) {
      return res.status(500).json({
        err_code: 500,
        message: err.message
      })
    }
    res.status(200).json({
      err_code: 0,
      message: 'delete success'
    })
  })
}